#重写继承方法和属性
#INFO:⼦类和⽗类具有同名属性和⽅法，默认使⽤⼦类的同名属性和⽅法。
class Master(object):
  def __init__(self):
    self.kongfu="[古法煎饼果子配方]"
  def makeCake(self):
    print(f"运用{self.kongfu}制作煎饼果子")
    
class School(object):
  def __init__(self):
    self.kongfu="[垃圾煎饼果子配方]"
  def makeCake(self):
    print(f"运用{self.kongfu}制作煎饼果子")
class Prentice(School,Master):
  def __init__(self):
    self.kongfu="[自创煎饼果子配方]"
  def makeCake(self):
    print(f"运用{self.kongfu}制作煎饼果子")
  def makeMasterCake(self):
    Master.__init__(self)
    Master.makeCake(self)
  def makeSchoolCake(self):
    School.__init__(self)
    School.makeCake(self)
class tusun (Prentice):
  pass
daqiu=tusun()
print(daqiu.kongfu)
daqiu.makeCake()
daqiu.makeMasterCake()
daqiu.makeSchoolCake()